//
//  System_DeviceIdHandler.swift
//  mall-ios
//
//  Created by Meak Tsui on 2018/11/28.
//  Copyright © 2018 Meak Tsui. All rights reserved.
//

import Foundation
import UIKit
import MTHybrid

extension Api {
    static let DeviceId = Api("deviceId")
}

class System_DeviceIdHandler: MTEventHandler {
    var ns: Ns {
        return .System
    }
    
    var action: Api {
        return .DeviceId
    }
    
    func handler(_ msg: MTHybridMsg) {
        let deviceId = UIDevice.current.identifierForVendor!.uuidString
        msg.callbackClosure?(deviceId)
    }
    
    
}

